
Alkaline.Processing.ValueNull = function() {
	return Alkaline.Processing.ValueNull.instance;
};

Alkaline.Processing.ValueNull.prototype = new Alkaline.Processing.ReferencedValue(
	Alkaline.Processing.ReferencedValue.VALUE_TYPE.NULL,
	null
);

Alkaline.Processing.ValueNull.instance = (function(){
	// basically, we do this so the following are true:
	//	ValueNull() instanceof ValueNull
	//	ValueNull() === ValueNull()
	var constructor = function(){};
	constructor.prototype = Alkaline.Processing.ValueNull.prototype;
	return new constructor();
})();

Alkaline.Processing.ValueNull.prototype._toPrimitive = function(unknown) {
	return null;
}

Alkaline.Processing.ValueNull.prototype.toNumber = function(unknown) {
	return new Alkaline.Processing.ReferencedValue(Alkaline.Processing.ReferencedValue.VALUE_TYPE.NUMBER, 0);
}

Alkaline.Processing.ValueNull.prototype.isSimpleValue = function() {
	return true;
}

Alkaline.Processing.ValueNull.prototype.toAST = function(builder) {
	return builder.Null();
}

Alkaline.Processing.ValueNull.prototype.toString = function() {
	return "Value:Null";
}
